src = $(wildcard src/*.c)
obj = $(src:.c=.o)
bin = inv

inc = -Isrc \
	  -I/usr/include \
	  -I/usr/local/include \
	  -I/usr/local/include/freetype2

libp = -L/usr/lib -L/usr/local/lib

CC = gcc
CFLAGS = -mwindows -pedantic -Wall -O3 -ffast-math $(inc) `sdl-config --cflags`
LDFLAGS = $(libp) -lglew32 -lopengl32 -lglu32 -lm `sdl-config --libs` -lpng -lz -ljpeg -lvorbisfile -lfreetype

$(bin): $(obj)
	$(CC) $(CFLAGS) -o $@ $(obj) $(LDFLAGS)

.PHONY: clean
clean:
	rm -f $(obj)
